---
published_at: 2025-03-19 08:00:00
---

_March 19, 2025_

# Announcing Rsdoctor 1.0

We are excited to announce the official release of **Rsdoctor 1.0**!

After a year of development and testing, we are proud to introduce **Rsdoctor 1.0** — a build analyzer tailored for the [Rspack](https://rspack.rs/) ecosystem and fully compatible with the [webpack](https://webpack.js.org/) ecosystem.

Rsdoctor is committed to being a one-stop, intelligent build analyzer that makes the build process transparent, predictable, and optimizable through visualization and smart analysis, helping development teams precisely identify bottlenecks, optimize performance, and improve engineering quality.

<video
  src="https://assets.rspack.rs/others/assets/rsdoctor/rsdoctor-1.0-ui.mp4"
  style={{
    width: '100%',
    height: 'auto',
    maxHeight: '50vh',
    objectFit: 'cover',
    display: 'block',
  }}
  autoPlay={true}
  muted={true}
  controls={true}
  loop={true}
  playsInline
/>

## Why Rsdoctor

In the field of build analysis, the community already has some mature tools, such as [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer) for visualizing bundles, and [Statoscope](https://github.com/statoscope/statoscope/) for comprehensive resource analysis. In addition, [speed-measure-webpack-plugin](https://github.com/stephencookdev/speed-measure-webpack-plugin) can be used to analyze the execution time of plugins and loaders, and locate build performance bottlenecks.

However, these tools still have some shortcomings, such as lack of detailed display of build details, lack of comprehensive build problem analysis capabilities, incompatibility with Rspack, and lack of build warning scanning capabilities.

In summary, community tools have the following areas for improvement:

1. **Lack of detail**: Traditional tools cannot delve into the details and changes of the build process, and to view the compilation details of a loader, developers often need to set breakpoints for step-by-step debugging.
2. **Functional limitations**: Current analyser typically only display bundle data, lacking build scanning capabilities, unable to proactively provide optimization suggestions, and do not support custom scanning rules.
3. **Support for Rspack**: Existing tools do not fully support Rspack, for example, they cannot analyze Rspack's [builtin loader](https://rspack.rs/guide/features/builtin-swc-loader) of Rspack.

### Birth of Rsdoctor

Based on the above situation, we decided to develop a build analyzer focused on the Rspack ecosystem — **Rsdoctor**.

We designed an intuitive user interface for Rsdoctor, and Rsdoctor extends the **loader profiling capability** by combining the advantages of multiple tools to more deeply analyze the loader behavior in the compilation phase, **built-in the scanning and detection rules for artifacts and compilation**, and supports user **custom rules**.

Rsdoctor not only supports Rspack and webpack, but also supports all tools and frameworks based on Rspack or webpack, such as: [Docusaurus](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-rsdoctor), [Rspeedy (Lynx)](https://lynxjs.org/rspeedy/), [Storybook](https://github.com/rspack-contrib/storybook-rsbuild), [Next.js](https://nextjs.org/), [Nuxt](https://nuxt.com/), [Re.Pack](https://re-pack.dev/), [Modern.js](https://modernjs.dev/), [Rsbuild](https://rsbuild.rs/), [Rspress](https://rspress.rs/) and [Rslib](https://rslib.rs/).

Rsdoctor can be used to:

- **As a build analyzer**: Help developers understand every aspect of the build process, and provide detailed compilation and bundle analysis.
- **As an extensible analysis tool**: Allow developers to customize analysis rules according to project requirements, and achieve targeted optimization of the build process.

## Who is using

Rsdoctor has been widely used within ByteDance, helping developers efficiently analyze and solve various problems in the build process.

Since its open source in 2024, Rsdoctor's npm weekly downloads has exceeded **100k**. In the community, Rsdoctor has been integrated into frameworks such as [Docusaurus](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-rsdoctor) and [Lynx](https://lynxjs.org/rspeedy/use-rsdoctor.html). In addition, Rsdoctor has also been adopted by large projects such as [Sentry](https://github.com/getsentry/sentry/pull/63865), [NocoBase](https://github.com/nocobase/nocobase/blob/main/packages/core/build/src/buildPlugin.ts#L493) and [Grafana](https://github.com/grafana/grafana/pull/94729).

In the future, Rsdoctor will continue to provide first-class support for all tools in the **Rstack** (`Rspack stack` abbreviation) ecosystem:

<img
  style={{ borderRadius: 12 }}
  src="https://assets.rspack.rs/rstack/rstack-overview.png"
/>

## Typical use cases

Rsdoctor offers a rich set of features, detailed content can be found in the [Feature Navigation](/guide/start/features). Here are some typical use cases that demonstrate how Rsdoctor effectively solves common build problems:

### 1. "Why is the build speed too slow?"

During the build process, if you find that the compilation speed is too slow, you can use the [Loader Timeline](/guide/usage/loaders-timeline) to view the time consumption of loader execution, and understand the compilation time consumption of each file by each loader. This way, you can find loaders with excessive time consumption.

<img
  style={{ borderRadius: 12 }}
  src="https://assets.rspack.rs/rsdoctor/assets/loader-timeline-overall-v1-0.png"
/>

### 2. "Outputs are not as expected?"

During the build, there may be problems where the outputs do not match expectations, such as runtime exceptions or style errors. The [Loader Details](/guide/usage/loaders-analysis) page of Rsdoctor can help you examine the changes made by the loader to a specific file before and after compilation.

<img
  style={{ borderRadius: 12 }}
  src="https://assets.rspack.rs/rsdoctor/assets/babel-import-errors-v1-0.png"
/>

### 3. "How to split the chunks reasonably?"

We can use the [Bundle Analysis](/guide/usage/bundle-size) page to look at the modules tree of a particular artifact to see what modules the chunk contains, and then use the [splitChunks](https://rspack.rs/zh/plugins/webpack/split-chunks-plugin) configuration of Rspack to split the chunks appropriately.

<img
  style={{ borderRadius: 12 }}
  src="https://assets.rspack.rs/rsdoctor/assets/bundle-size-overall-v1-0.png"
/>

### 4. "How to analyze the reasons for the increase in bundle size?"

When a certain version is launched, if the performance of the online page deteriorates due to the increase in the size of the artifact, you can use the [Bundle Diff](/guide/usage/bundle-diff) feature of Rsdoctor to compare the details of the bundles of two commits, as well as the changes in the npm packages they depend on.

<img
  style={{ borderRadius: 12 }}
  src="https://assets.rspack.rs/rsdoctor/assets/bundle-diff-assets-v1-0.png"
/>

### 5. "Why is a certain module bundled?"

During the build process, if you want to know why a certain module file is bundled into the artifact, you can click on the `Module Graph` icon behind the module in the Modules tree on the [Artifact Analysis](/guide/usage/bundle-size) page to view the upstream dependency relationship of the module.

<img
  style={{ width: 700, margin: 'auto', borderRadius: 12 }}
  src="https://assets.rspack.rs/rsdoctor/assets/module-analysis-tree-v1-0.png"
/>

## What's new in 1.0

### 🎨 Brand new UI

In version 1.0, we have comprehensively optimized the user interface of Rsdoctor, making it more clear, elegant, and easy to navigate. The new design is dedicated to improving the user experience, making information display more intuitive and efficient.

### 🚀 Faster analysis

In large projects, enabling Rsdoctor can increase the overall build time. To solve this problem, we rewrote the time-consuming data processing logic in Rsdoctor in Rust, and integrated it into Rspack.

This optimization effectively improves the build analysis performance of Rsdoctor, and reduces the overall analysis time by more than **20%**. In the future, we will continue to native more modules to further improve the analysis efficiency.

This optimization can be enabled through the [enableNativePlugin](/config/options/options#enablenativeplugin) option:

```ts
new RsdoctorRspackPlugin({
  experiments: {
    enableNativePlugin: true,
  },
});
```

### 🔍 Module searching

- **Search Module Capability**: In the `Bundle Size` page, we have added a module search function. Users can quickly locate and view the `Assets` where the module is located by entering the module name, making it more convenient to analyze the reference relationship and size of the module. [Details](/guide/usage/bundle-size#%E6%A8%A1%E5%9D%97%E6%90%9C%E7%B4%A2%E5%8A%9F%E8%83%BD)

<img
  style={{ width: '80%', margin: 'auto', borderRadius: 12 }}
  src="https://assets.rspack.rs/rsdoctor/assets/search-modules-v1-0.png"
/>

### 🛠️ New scanning rules

- [Duplicate package detection](/guide/rules/rules#e1002-cross-chunks-package): Added a rule for detecting duplicate packages across chunks, which can scan for duplicate packages in different `chunks`. These duplicate packages may cause redundant code in the build.
- [ECMA version checking](/guide/rules/rules#e1004-ecma-version-check): Enhanced the ECMA version detection rule, used to detect incompatible advanced syntax.

```ts
new RsdoctorRspackPlugin({
  linter: {
    rules: {
      'ecma-version-check': [
        'Warn',
        {
          ecmaVersion: 2015,
        },
      ],
    },
  },
});
```

## How to use 1.0

- If you are using any tool or framework based on Rspack or webpack, you can refer to the [Quick Start](/guide/start/quick-start) to start using Rsdoctor.
- If you are using Rsdoctor 0.4 or earlier, please note that 1.0 contains a few incompatible updates:
  - The `reportCodeType` and `reportDir` configuration items in the plugin configuration have been moved to [output](/config/options/options#reportcodetype).

> Welcome to give a star 🌟 to the [Rsdoctor GitHub](https://github.com/web-infra-dev/rsdoctor) repository.

## Next steps

- **AI powered analysis**: The build analysis data collected by Rsdoctor is very rich, but there may be a certain learning curve for new users. Therefore, we will integrate AI capabilities into Rsdoctor to help users quickly extract key information from massive data, provide intelligent optimization suggestions, and reduce the threshold of build analysis.
- **CI proactive monitoring**: Rsdoctor will extend its capabilities in CI environments by introducing [Rsdoctor CI Action](https://github.com/web-infra-dev/rsdoctor/discussions/491), based on the existing [Bundle Diff](/guide/usage/bundle-diff) feature. This will provide automated monitoring of bundle sizes and alerts for performance issues to ensure quality.
- **Further Native**: Due to the implementation of Rspack in Rust and the use of a multi-threaded architecture, the current analysis of the built-in loader of Rspack by Rsdoctor is not accurate enough. We plan to optimize the analysis mechanism based on [Rspack Native Plugin](/config/options/options#enablenativeplugin), and provide more accurate loader performance data and compilation behavior insights.

**Finally, thank you to all the developers who have contributed to Rsdoctor ❤️**:

[@9aoy](https://github.com/9aoy)、[@bin1357](https://github.com/bin1357)、[@cairon666](https://github.com/cairon666)、[@cclap2020](https://github.com/cclap2020)、[@charpeni](https://github.com/charpeni)、[@chenjiahan](https://github.com/chenjiahan)、[@ChuHoMan](https://github.com/ChuHoMan)、[@cnryb](https://github.com/cnryb)、[@Gehbt](https://github.com/Gehbt)、[@gezhicui](https://github.com/gezhicui)、[@HigherOrderLogic](https://github.com/HigherOrderLogic)、[@iamleniac](https://github.com/iamleniac)、[@inottn](https://github.com/inottn)、[@jkzing](https://github.com/jkzing)、[@KyrieLii](https://github.com/KyrieLii)、[@kwonoj](https://github.com/kwonoj)、[@LingyuCoder](https://github.com/LingyuCoder)、[@nanianlisao](https://github.com/nanianlisao)、[@nhducit](https://github.com/nhducit)、[@NickBolles](https://github.com/NickBolles)、[@nyqykk](https://github.com/nyqykk)、[@puppet-666](https://github.com/puppet-666)、[@SoonIter](https://github.com/SoonIter)、[@sudhakar-s](https://github.com/sudhakar-s)、[@Timeless0911](https://github.com/Timeless0911)、[@tinywaves](https://github.com/tinywaves)、[@trueLoving](https://github.com/trueLoving)、[@wChenonly](https://github.com/wChenonly)、[@zllkjc](https://github.com/zllkjc)。
